package com.burpee.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.burpee.dao.CoordinateDao;
import com.burpee.ui.Coordinate;

@Service(value="coordinateService")
public class CoordinateServiceImpl implements CoordinateService {

	@Autowired
	CoordinateDao coordinateDao;
	public List<Coordinate> list() {
		
		return coordinateDao.list();
	}

	public Coordinate view(Coordinate coordinate) {
		
		return coordinateDao.view(coordinate);
	}

	public boolean add(Coordinate coordinate) {
		if(coordinateDao.add(coordinate) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean modify(Coordinate coordinate) {
		if(coordinateDao.modify(coordinate) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean remove(Coordinate coordinate) {
		if(coordinateDao.remove(coordinate) > 0){
			return true;
		}
		else{

			return false;
		}
	}

}
